package fumeurPolie;


public class Cabaretier implements Runnable{
	
	@Override
	public void run() {
		while(true){
			try {
				TableSingleton.GetInstance().tableVide.acquire();
				int ing1, ing2;
				ing1 = (int)(java.lang.Math.random()*3);
				ing2 = (int)(java.lang.Math.random()*3);
				if(ing1 == ing2){
					ing2 = (ing2+1)%3;
				}
				TableSingleton.GetInstance().AjouterIngredient(ing1,ing2);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
		
	}
	
}
